﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 设计模式.原型模式
{
    public abstract class Shape : ICloneable
    {
        public string Id { set; get; }
        public String Type { set; get; }

        public abstract void Draw();

        public object Clone()
        {
            Object clone = null;
            try
            {
                clone = MemberwiseClone();
            }
            catch(Exception e)
            {
                Console.WriteLine(e.StackTrace);
            }
            return clone;
        }
    }
}
